草庐IT

Android SDK Manager 安装特定版本的 NDK Bundle

全部标签

ruby - RVM Ruby 1.9.1 安装找不到 zlib 但它的运行时和开发库在那里

尝试在全新安装(fedora)上使用RVM启动并运行Ruby1.9.1。执行rvminstall1.9.1后,rubygems错误日志显示找不到zlibnosuchfiletoload--zlib(LoadError)但是zlib运行时和开发库都已安装并且是最新的。我现在有点被这个难住了。 最佳答案 使用rvm安装zlibhttps://rvm.io/packages/zlib/rvmpackageinstallzlibrvmremove1.9.1rvminstall1.9.1-C--with-zlib-dir=$rvm_path/

ruby-on-rails - bundler :在使用 gem 进行 bundle 安装期间,找不到带有可执行 bundle (Gem::GemNotFoundException) 的 gem bundler (>= 0.a)

我正在执行以下脚本:geminstallrdoc--no-documentgeminstallbundlebundle输出:+geminstallrdoc--no-documentSuccessfullyinstalledrdoc-6.1.11geminstalled+geminstallbundleSuccessfullyinstalledbundle-0.0.1Parsingdocumentationforbundle-0.0.1Doneinstallingdocumentationforbundleafter2seconds1geminstalled1geminstalled+b

ruby - 如何在 gemspec 中指定最低 Ruby 版本?

我正在为现在需要Ruby1.9的新版本gem编写gemspec。以前版本的gem可以用于Ruby1.8,但现在需要1.9。有没有办法导致此版本gem的gem安装失败,并向尝试在Ruby1.8上安装它的用户发出警告? 最佳答案 来自RubyGemsdocumentation:#Thisgemwillworkwith1.8.6orgreater...spec.required_ruby_version='>=1.8.6'#Onlywithruby2.0.xspec.required_ruby_version='~>2.0'

ruby - 如何使用 bundler 重新安装 gem

我做了一个bundleshow并获取gem目录的完整路径。不幸的是,我使用rm-rgem_path删除了目录.然后我的Rails应用程序不再工作了。如果我尝试启动服务器或启动Rails控制台,它会输出以下错误::uninitializedconstantMyAPP::Application::Gem(NameError)我应该怎么做才能取回它?我试过了bundleinstall或bundleupdate希望强制bundle搜索gem并将其安装回去,但没有用。我也试过删除Gemfile.lock然后运行​​bundleinstall.没有任何改变,同样的错误。有问题的gem是Actast

ruby - 你的 Ruby 版本是 2.0.0,但是你的 Gemfile 指定了 2.1.0

当我尝试捆绑安装时,我收到以下消息:YourRubyversionis2.0.0,butyourGemfilespecified2.1.0在我的Gemfile中有以下内容:ruby'2.1.0'当我在控制台中运行ruby-v时,我得到:ruby2.1.0p0(2013-12-25revision44422)[x86_64-darwin12.0]Ruby2.1.0p0是什么意思?我的Gemfile中应该有什么版本,为什么错误告诉我我有Ruby版本2.0.0? 最佳答案 运行geminstallbundler或gemupdatebund

ruby - rbenv install --list 不列出版本 2.1.2

我在OSX10.9.3MacBookPro上通过Homebrew安装了rbenv:brewupdatebrewupgraderbenvruby-build根据rbenvinstall--list在我的笔记本电脑上Ruby2.1.0-dev是最新的。 最佳答案 rbenv和ruby-build一般都是从Github克隆安装的;就是这样theauthorsrecommendweinstallit.gitclonehttps://github.com/sstephenson/rbenv.git~/.rbenvgitclonehttps:/

ruby - gem 安装因 openssl 失败而失败

我尝试在我的OSXMountainLion上安装cocoapods(http://cocoapods.org/)。moshe-mbp:~moshem$geminstallcocoapodsERROR:Couldnotfindavalidgem'cocoapods'(>=0),hereiswhy:Unabletodownloaddatafromhttps://rubygems.org/-SSL_connectreturned=1errno=0state=SSLv3readserverkeyexchangeB:badecpoint(https://rubygems.org/latest_s

ruby - Mountain Lion rvm 安装 1.8.7 x11 错误

更新到MountainLion后,我尝试安装1.8.7,但出现错误。找不到X11文件,我安装了Xquarkz,但没有任何改变。怎么了?Failtofind[tclConfig.sh,tkConfig.sh]UseMacOSXFrameworks.FindTcl/Tklibraries.Maketcltklib.sowhichisrequiredbyRuby/Tk.clang-I.-I../..-I../../.-I../.././ext/tk-DHAVE_RB_SAFE_LEVEL-DHAVE_RB_HASH_LOOKUP-DHAVE_RB_PROC_NEW-DHAVE_RB_OBJ_

ruby-on-rails - 将字符串转换为特定的日期时间格式?

字符串"2011-05-1910:30:14"到ThuMay1910:30:14UTC2011如何将特定字符串转换为这种日期格式? 最佳答案 require'date'date=DateTime.parse("2011-05-1910:30:14")formatted_date=date.strftime('%a%b%d%H:%M:%S%Z%Y')参见strftime()有关格式化日期的更多信息。 关于ruby-on-rails-将字符串转换为特定的日期时间格式?,我们在StackOve

ruby - 如何告诉 Rubocop 忽略特定目录或文件

我的项目是从第三方gem扩展开源类,我们不想将其与我们自己的代码保持相同的编码标准。重构gem代码不是一个可行的选择。我们只是想让Rubocop忽略复制的代码。如何指示Rubocop完全忽略文件或目录? 最佳答案 根据带有指向themanual链接的订单评论我找到了.rubocop.yml并添加了以下内容:AllCops:Exclude:-'path/to/excluded/file.rb'路径是相对于.rubocop.yml的地方 关于ruby-如何告诉Rubocop忽略特定目录或文件